import { GCellRenderer } from "../../../../com/mui/controls/GCellRenderer";
import { GlobalClass } from "../../../../com/mui/core/GlobalClass";
import { ObjCreate } from "../common/ObjCreate";
import { GTextFormat } from "../../../common/GTextFormat";
import { GTextFiled } from "../../../../com/mui/controls/GTextFiled";
//class JewelComboboxRenderer
    
    export  class JewelComboboxRenderer extends GCellRenderer
    {
        constructor()
        {
            super();
            this.init();
            this.addEventListener(flash.events.MouseEvent.MOUSE_MOVE, this.onMouseMove);
            this.addEventListener(flash.events.MouseEvent.MOUSE_OUT, this.onMouseOut);
            return;
        }

        public init(): void
        {
            this._across = GlobalClass.getBitmap("PullDownAcross");
            this._across.x = -20;
            this._across.visible = false;
            this.addChild(this._across);
            this.text = ObjCreate.createGTextField("", 0, 0, 40, 20, this, new GTextFormat(null, 12, 11661567));
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            if (arg1) 
            {
                this.text.htmlText = arg1["label"];
            }
            else 
            {
                this.text.htmlText = "";
            }
            return;
        }

        /* internal  */onMouseMove(arg1: Object /* flash.events.MouseEvent */): void
        {
            this._across.visible = true;
            this.text.textColor = 16055808;
            return;
        }

        /* internal  */onMouseOut(arg1: Object /* flash.events.MouseEvent */): void
        {
            this._across.visible = false;
            this.text.textColor = 11661567;
            return;
        }

        /* internal */ /* var */_across: Object /* flash.display.Bitmap */;

        /* internal */ /* var */text: GTextFiled;
    }
